package ch9;

/**
 * @author oldliu
 * @since 1.0
 */
public class TwoDimension {
    public static void main(String[] args) {
        int ar[][]={{1,2},{4,6},{6,8}};
        //System.out.println(ar[3][2]);
        int [][]a=new int[5][10];
        for(int i=0;i<a.length;i++){
            for(int j=0;j<a[i].length;j++){
                a[i][j]= (int) (Math.random()*100);
            }
        }
        for(int i=0;i<a.length;i++){
            for(int j=0;j<a[i].length;j++){
                System.out.print(a[i][j]+" ");
            }
            System.out.println();
        }
        int max=a[0][0];
        for(int i=0;i<a.length;i++){
            for(int j=0;j<a[i].length;j++){
                if(a[i][j]>max)
                    max=a[i][j];
            }

        }
        System.out.println(max);
    }
}
